package com.foruo.learn.designmode.strategy;

public class TestMe {

    public static void main(String[] args){
        // 加
        Context context = new Context(new AddOperation());
        System.out.println(context.execute(6,2));
        // 减
        context = new Context(new SubOperation());
        System.out.println(context.execute(6,2));
        // 乘
        context = new Context(new MulOperation());
        System.out.println(context.execute(6,2));
        // 除
        context = new Context(new DivOperation());
        System.out.println(context.execute(6,2));

    }

}
